package edu.whut.exception.handleException;
/*
1.try{
    ***
   }catch{
   ***
   }finally{
   ****}
 */
public class HandleDemo1 {
    public static void main(String[] args) {
        System.out.println("start");
        try {
            int[] arr = null;
            System.out.println(arr[10]);
            System.out.println(10/0);
        }catch (ArithmeticException e ){
            System.out.println("捕获异常");
        }catch (NullPointerException e){
            System.out.println("捕获空指针异常");
        }catch (Exception e){
            System.out.println("捕获大异常");
        }

        System.out.println("end");
    }
}
